package net.vanchu.mortgagecalculator.common;

import android.content.Context;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

/**
 * Created by grant on 16-12-29.
 */

public class CommonSoftKeyBoardHelper {

    public static void checkSoftKeyBoard(View parentView) {
        if (parentView != null) {
            Context context = parentView.getContext();
            InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
            imm.hideSoftInputFromWindow(parentView.getWindowToken(), 0);
        }
    }

}